#ifndef __BTCORE_H
#define __BTCORE_H

#include <types.h>

#define MAX_PACKET_DATA_BYTES 4096

typedef struct bt_packet {
#ifdef BT_HSM30_SUPPORT
	u8  command;
#endif	
	u8  *data;
	u32 data_len;
} BT_PACKET;

struct bluetooth_operations {
	int        (*init)(void);
	int 			 (*write)(BT_PACKET *);
	BT_PACKET* (*read)(void);
};

int bluetooth_init(int (*handler)(void *));
int bluetooth_write(BT_PACKET *arg);
BT_PACKET *bluetooth_read(void);
void bluetooth_start(void *arg);
void bluetooth_stop(void *arg);
void bluetooth_read_daemon(void *arg);

#endif
